package com.nlp.visualization.pojo.db;/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author LXM
 */
@Entity
@Table(name = "t_manager_info")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TManagerInfo.findAll", query = "SELECT t FROM TManagerInfo t"),
    @NamedQuery(name = "TManagerInfo.findById", query = "SELECT t FROM TManagerInfo t WHERE t.id = :id"),
    @NamedQuery(name = "TManagerInfo.findByName", query = "SELECT t FROM TManagerInfo t WHERE t.name = :name"),
    @NamedQuery(name = "TManagerInfo.findByPassword", query = "SELECT t FROM TManagerInfo t WHERE t.password = :password"),
    @NamedQuery(name = "TManagerInfo.findBySex", query = "SELECT t FROM TManagerInfo t WHERE t.sex = :sex"),
    @NamedQuery(name = "TManagerInfo.findByImageUri", query = "SELECT t FROM TManagerInfo t WHERE t.imageUri = :imageUri"),
    @NamedQuery(name = "TManagerInfo.findByDescription", query = "SELECT t FROM TManagerInfo t WHERE t.description = :description"),
    @NamedQuery(name = "TManagerInfo.findByAddingTime", query = "SELECT t FROM TManagerInfo t WHERE t.addingTime = :addingTime")})
public class TManagerInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "name")
    private String name;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "password")
    private String password;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "sex")
    private String sex;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 1023)
    @Column(name = "image_uri")
    private String imageUri;
    @Size(max = 2047)
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @NotNull
    @Column(name = "adding_time")
    private long addingTime;

    public TManagerInfo() {
    }

    public TManagerInfo(Integer id) {
        this.id = id;
    }

    public TManagerInfo(Integer id, String name, String password, String sex, String imageUri, long addingTime) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.sex = sex;
        this.imageUri = imageUri;
        this.addingTime = addingTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getImageUri() {
        return imageUri;
    }

    public void setImageUri(String imageUri) {
        this.imageUri = imageUri;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public long getAddingTime() {
        return addingTime;
    }

    public void setAddingTime(long addingTime) {
        this.addingTime = addingTime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TManagerInfo)) {
            return false;
        }
        TManagerInfo other = (TManagerInfo) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "dao.TManagerInfo[ id=" + id + " ]";
    }
    
}
